import QtQuick 2.6
import QtQuick.Layouts 1.1

import "../../Base/UiBase"
import "../../Base/Config"
import FunctionalItem 1.0

Item {
    id: root
    width: 300 * Size.ratio
    height: col.height

    MouseArea {
        parent: indexRoot
        anchors.fill: parent
        visible: root.visible
        onClicked: root.visible = false

        Column {
            id: col
            width: root.width
            AutoPositioner { syncItem: root }
            visible: root.visible
            spacing: 0
            Item {
                width: parent.width
                height: 14 * Size.ratio //19.798989873223330683223642138936
                Rectangle {
                    x: parent.width * 0.8 - width / 2
                    width: parent.height * 1.4142135623730950488016887242097
                    height: width
                    anchors {
                        top: parent.bottom
                        topMargin: -height / 2
                    }
                    color: Color.foreground

                    transformOrigin: Rectangle.Center
                    rotation: 45
                }
            }
            Rectangle {
                width: parent.width
                height: container.height
                color: Color.foreground
                radius: 10 * Size.ratio
                Column {
                    id: container
                    width: parent.width
                    spacing: 0

                    Item {
                        width: parent.width
                        height: 10 * Size.ratio
                    }
                    SvgzImage {
                        width: 300 * Size.ratio
                        height: 90 * Size.ratio
                        source: "../../../resources/tcommunity/navBar/sixin.svg"
                        LoaderMouseArea {
                            anchors.fill: parent
                            onClicked: {
                                loader.source = "PrivateMessage.qml"
                                root.visible = false
                            }
                            loader: Loader {
                                parent: mainRoot
                                anchors.fill: parent
                            }
                        }
                        Rectangle {
                            width: 35 * Size.ratio
                            height: width
                            anchors.right: parent.right
                            anchors.verticalCenter: parent.verticalCenter
                            anchors.rightMargin: 30 * Size.ratio
                            radius: width / 2
                            color: "Red"
                            Text {
                                anchors.centerIn: parent
                                font.pixelSize: Size.font26
                                color: Color.foreground
                                text: String(2)
                            }
                        }

                        BottomDivider {
                            width: 250 * Size.ratio
                        }
                    }
                    SvgzImage {
                        width: 300 * Size.ratio
                        height: 90 * Size.ratio
                        source: "../../../resources/tcommunity/navBar/pinglun.svg"
                        LoaderMouseArea {
                            anchors.fill: parent
                            onClicked: {
                                loader.source = "CommentMessage.qml"
                                root.visible = false
                            }
                            loader: Loader {
                                parent: mainRoot
                                anchors.fill: parent
                            }
                        }
                        BottomDivider {
                            width: 250 * Size.ratio
                        }
                    }
                    SvgzImage {
                        width: 300 * Size.ratio
                        height: 90 * Size.ratio
                        source: "../../../resources/evaluation/nav/xiaoxi.svg"
                        LoaderMouseArea {
                            anchors.fill: parent
                            onClicked: {
                                loader.source = "GeneralMessage.qml"
                                root.visible = false
                            }
                            loader: Loader {
                                parent: mainRoot
                                anchors.fill: parent
                            }
                        }
                    }
                }
            }
        }
    }
}
